package Ar;

import java.util.Scanner;

/**
 * @Author MDD
 * @Description
 * @Version
 * @Date
 **/
public class Code05 {
    public static void main(String[] args) {
        int[] ar = {321,3,13,43,31,0};
        Scanner sc = new Scanner(System.in);
        int index = ar.length-1;
        System.out.print("请输入新增成绩：");
        int num = sc.nextInt();
        for (int i = 0; i <ar.length - 1; i++) {
            if (num>ar[i]){
                index = i;
                break;
            }
        }
        System.out.println("待插入的新成员的下标为："+index);




        System.out.println("插入后的成绩是：");
    }
}
